﻿using HarmonyLib;
using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using Verse;

[HarmonyPatch(typeof(Pawn_HealthTracker), "ShouldBeDead")]
public static class Pawn_HealthTracker_ShouldBeDead_Patch
{
    private static bool Prefix(Pawn_HealthTracker __instance, ref bool __result)
    {

       var hediff =  __instance.hediffSet.GetFirstHediff<HediffForever>();
        if(hediff!=null)
        {
            __result = false;
            return false;
        }
        return true;
    }
}
